import { CustomDataType } from "../../constants";
import ImageBase64Url from "./Custom/ImageBase64Url";
import RichText from './Custom/RichText';
import UserCard from './Custom/UserCard';
import System from './Custom/System';

export default function(props) {
  const { dataType } = props.msgContent;

  switch(dataType) {
    case CustomDataType.RichText:
      return <RichText {...props} />;
    case CustomDataType.ImageBase64Url:
      return <ImageBase64Url {...props} />;
    case CustomDataType.UserCard:
      return <UserCard {...props} />;
    case CustomDataType.System:
    return <System {...props} />;
    default:
      return null;
  }
}